home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume6 / help / part2 < prev    next >
Encoding:
Internet Message Format  |  1986-11-30  |  24.7 KB

  1. Subject: v06i044:  Help programs (help), Part2/2
  2. Newsgroups: mod.sources
  3. Approved: rs@mirror.UUCP
  4.  
  5. Submitted by: talcott!seismo!wucs!nz (Neal Ziring)
  6. Mod.sources: Volume 6, Issue 46
  7. Archive-name: help/Part2
  8.  
  9. [  This is a sample small help directory, to get you started.  Note
  10.    that any files within the help tree must have world-read
  11.    permission, and all directories must have world-read/execute.
  12.    Also, if you put this tree in somewhere other than /usr/help
  13.    (the shar specifies ./help.dir), you'll have to change the
  14.    HELPDIR #define in help.h source  --r$ ]
  15.  
  16. #!/bin/sh
  17. # This is a shell archive.  Remove anything before this line,
  18. # then unpack it by saving it in a file and typing "sh file".
  19. #
  20. # Wrapped by mirror!rs on Wed Jul  9 13:05:00 EDT 1986
  21. # Contents:  help.dir// help.dir/vi/ help.dir/vi/commands/
  22. #    help.dir/.HLP help.dir/COMMANDS.HLP help.dir/date.HLP
  23. #    help.dir/su.HLP help.dir/su.MANUAL help.dir/who.HLP
  24. #    help.dir/who.MANUAL help.dir/vi/options.HLP
  25. #    help.dir/vi/starting.HLP help.dir/vi/states.HLP
  26. #    help.dir/vi/commands/change.HLP help.dir/vi/commands/delete.HLP
  27. #    help.dir/vi/commands/funky.HLP help.dir/vi/commands/insert.HLP
  28. #    help.dir/vi/commands/other_commands.HLP
  29.  
  30. echo mkdir - help.dir/
  31. mkdir help.dir/
  32. chmod u=rwx,g=rwx,o=rwx help.dir/
  33.  
  34. echo x - help.dir/.HLP
  35. sed 's/^XX//' > "help.dir/.HLP" <<'@//E*O*F help.dir/.HLP//'
  36. XXThis is a dummy top-level help file.  A good use of this file is
  37. XXto give pointers to the maintainers of the HLP documentation.
  38. @//E*O*F help.dir/.HLP//
  39. chmod u=rw,g=rw,o=rw help.dir/.HLP
  40.  
  41. echo x - help.dir/COMMANDS.HLP
  42. sed 's/^XX//' > "help.dir/COMMANDS.HLP" <<'@//E*O*F help.dir/COMMANDS.HLP//'
  43.  
  44. XX        Here is a list of popular commands and software systems
  45. XX    available on the CEC UNIX systems.  To get the manual 
  46. XX    page for a command, try `man command_name'.  To get
  47. XX    the help on that command, if any, try `help topic_name'.  
  48.  
  49.  
  50. XX      COMMAND                     FUNCTION                     HELP TOPIC
  51.  
  52. XX      adb                                          debugger
  53. XX      apropos                    locate commands by keyword    apropos
  54. XX      ar                        archive, library maintainer
  55. XX      at                     execute commands at later time
  56. XX      awk            pattern scanning & processing language
  57. XX      ada                     Ada language compiler and RTS    ada
  58. XX      apl                                   APL interpreter
  59. XX      biff                  be notified if new mail arrives    mail
  60. XX      cal                                   print calendars    calendar
  61. XX      cat                                     catenate data    cat,shell
  62. XX      caesar                        graphical layout editor    cad
  63. XX      cb                               C program beautifier    C
  64. XX      cc                                         C compiler    C
  65. XX      cd                           change working directory    cd,shell
  66. XX      chmod                         change protection modes    chmod
  67. XX      clear                           clear terminal screen    clear
  68. XX      col                           filter formatter output    documents
  69. XX      correct                     correct spelling mistakes    documents
  70. XX      cp                                         copy files    copy
  71. XX      csh            command interpreter with C-like syntax    shell
  72. XX      ctrlc                  system/matrix analysis program    ctrlc
  73. XX      curses                  Optimal cursor motion package
  74. XX      date                          print the time and date    time_of_day
  75. XX      dbx                                 symbolic debugger    dbx
  76. XX      dd                              copy and convert data
  77. XX      deroff                      remove formatter commands    documents
  78. XX      df                       list disk usage by partition    df
  79. XX      diction                          find wordy sentences    documents
  80. XX      diff            differential file & directory compare    diff
  81. XX      ditroff               troff typesetter for the Imagen    documents
  82. XX      du                  summarize disk usage of directory    du
  83. XX      echo                                   echo arguments    shell
  84. XX      eqn                               typeset mathematics
  85. XX      explain                        theasaurus for diction    documents
  86. XX      f77                               Fortran 77 compiler    fortran
  87. XX      file                              determine file type    file
  88. XX      find                                       find files
  89. XX      finger                        user information lookup    finger
  90. XX      fold                             fold long text lines    fold
  91. XX      from                        print sources of new mail    mail
  92. XX      fsplit                      split up fortran programs
  93. XX      ftp                 intersystem File Transfer Program    copy
  94. XX      gemacs (GNU)                   veratile screen editor    emacs
  95. XX      gpssh                          GPSS simulation system
  96. XX      graph                       plot data on a nice graph    graphics
  97. XX      grep                       search a file for patterns    grep
  98. XX      groups                          show group membership    groups
  99. XX      head                             give first few lines
  100. XX      hostname                   print name of current host    hostname
  101. XX      indent                   indent and format C programs    C
  102. XX      join                          join database primitive
  103. XX      kill                                   kick a process    kill
  104. XX      last                         print recent user logins    last
  105. XX      learn              computer-aided instruction on UNIX    learn
  106. XX      leave               remind you when you have to leave    leave
  107. XX      lex                    generator of lexical analyzers    lex
  108. XX      lisp                       Franz Lisp dialect of lisp    lisp
  109. XX      ln                                         make links    ln
  110. XX      lock                            reserve your terminal
  111. XX      lpq                       Examine line-printer queues    printing
  112. XX      lpr                     Print stuff at a line printer    printing
  113. XX      lprm                     remove jobs from print queue    printing
  114. XX      ls                       list contents of directories    ls
  115. XX      m4                       compleat macro pre-processor    m4
  116. XX      mail                 electronic (network) mail system    mail
  117. XX      make                          maintain program groups    make
  118. XX      man                   on-line UNIX programmers manual    man
  119. XX      mkdir                                make a directory    mkdir
  120. XX      more                             file perusal program    more
  121. XX      mt                       manipulate the magtape drive
  122. XX      mv                              move and rename files    mv
  123. XX      passwd                          change login password    password
  124. XX      pc                                    pascal compiler    pascal
  125. XX      pi                                 pascal interpreter
  126. XX      plot                                 graphics filters    graphics
  127. XX      postnews                        submit a news article    news
  128. XX      pr                 paginate, label, and collate files    pr
  129. XX      print                         paginate and print file    printing
  130. XX      ps                             display process status    ps
  131. XX      pwd                   print current working directory    shell
  132. XX      quota                            print current quotas    quota
  133. XX      ratfor                 rational fortran pre-processor
  134. XX      rcp                                  Remote file copy    copy
  135. XX      reset          reset the tty driver to sensible state    terminals
  136. XX      rm                        remove files or directories    rm
  137. XX      rsh                  run a command on a remote system    rsh
  138. XX      ruptime           show status of all hosts on network    ruptime
  139. XX      rwho               show who is logged in on all hosts    rwho
  140. XX      script             make a typescript of login session    script
  141. XX      sed                            stream editor (filter)    sed
  142. XX      sh                       standard command interpreter
  143. XX      slam               discrete-event simulation language
  144. XX      sort                             sort and merge files    sort
  145. XX      spell                            find spelling errors    spell
  146. XX      spice            accurate low-level circuit simulator    cad
  147. XX      spitbol                  SNOBOL4 language interpreter    spitbol
  148. XX      spline                       interpolate smooth curve    graphics
  149. XX      split                        split a file into pieces    split
  150. XX      su                        substitute user temporarily    su
  151. XX      tail                      deliver last part of a file    tail
  152. XX      talk               talk to another user on the screen    talk
  153. XX      tbl                              format pretty tables    documents
  154. XX      tee                                      pipe fitting    tee
  155. XX      tr                               translate characters    tr
  156. XX      tset                  set up terminal characteristics    terminals
  157. XX      tty                         print name of current tty    terminals
  158. XX      uniq           filter out duplicate lines from stream    uniq
  159. XX      uptime               how long has the system been up?    w
  160. XX      vi                                      visual editor    vi
  161. XX      vlsi tools                 Berkeley VSLI design tools    cad
  162. XX      vnews                full-screen news-reading program    news
  163. XX      w          who is on the system? What are they up to?    w
  164. XX      whatis                     describe what a program is    whatis
  165. XX      who                              who is on the system    who
  166. XX      whoami                print current effective user id    whoami
  167. XX      wport          print information about users and ttys    wport
  168. XX      yacc                        LALR(1) compiler-compiler
  169. XX      z           flexible command-based full-screen editor    z
  170.  
  171.  
  172. XX    There are many more useful commands and applications programs
  173. XX    available.  For more information, see section 1 of the UNIX
  174. XX    PROGRAMMER'S MANUAL, or ask a consultant.
  175.  
  176. @//E*O*F help.dir/COMMANDS.HLP//
  177. chmod u=rw,g=rw,o=rw help.dir/COMMANDS.HLP
  178.  
  179. echo x - help.dir/date.HLP
  180. sed 's/^XX//' > "help.dir/date.HLP" <<'@//E*O*F help.dir/date.HLP//'
  181.  
  182. XX    The command `date' returns the system time and date.
  183. XX    The form in which it is returned uses three-letter
  184. XX    abbreviations for days of the week and months of the
  185. XX    year.  Time is given in military (24-hr) style.
  186.  
  187. XX        % date
  188. XX        Tue Feb 30 13:38:31 CST 1985
  189.  
  190. @//E*O*F help.dir/date.HLP//
  191. chmod u=rw,g=rw,o=rw help.dir/date.HLP
  192.  
  193. echo x - help.dir/su.HLP
  194. sed 's/^XX//' > "help.dir/su.HLP" <<'@//E*O*F help.dir/su.HLP//'
  195.  
  196. XX    Su subsitutes a new user identity on top of the current one.
  197. XX    The syntax of  su  is simple:
  198.  
  199. XX        su  [ username ]
  200.  
  201. XX    Usually, su is used to substitute a new user identity for
  202. XX    the purpose of accessing files or programs owned by that
  203. XX    user.  For instance,
  204.  
  205. XX        % su cs456t5
  206.  
  207. XX    might be used to substitute the cs456 term 5 user identity
  208. XX    to work on a team report.
  209.  
  210. XX    If the user whose identity you are trying to assume has a
  211. XX    password, su will insist on you typing this password correctly
  212. XX    before granting you the new identity.
  213.  
  214. XX    When given no parameters, su assumes you wish to substitute the
  215. XX    "root" user identity.  Root wields all system privileges and
  216. XX    powers.  The command
  217.  
  218. XX        % su
  219.  
  220. XX    is therefore used only by system staff.
  221.  
  222. XX    To exit from the shell created by su, type the command `exit'.
  223.  
  224. XX        % su cs456t7
  225. XX        Password: ...
  226. XX        456> vi report.nroff
  227. XX        456> nroff -me report.nroff | lpr
  228. XX        456> exit
  229. XX        % 
  230.  
  231. @//E*O*F help.dir/su.HLP//
  232. chmod u=rw,g=rw,o=rw help.dir/su.HLP
  233.  
  234. echo x - help.dir/su.MANUAL
  235. sed 's/^XX//' > "help.dir/su.MANUAL" <<'@//E*O*F help.dir/su.MANUAL//'
  236. XX man 1 su
  237. @//E*O*F help.dir/su.MANUAL//
  238. chmod u=rwx,g=rwx,o=rwx help.dir/su.MANUAL
  239.  
  240. echo x - help.dir/who.HLP
  241. sed 's/^XX//' > "help.dir/who.HLP" <<'@//E*O*F help.dir/who.HLP//'
  242.  
  243. XX    Who is a command to find out what users are on the system and
  244. XX    when they logged on.  To use this command, just type
  245.  
  246. XX    %who
  247.  
  248. @//E*O*F help.dir/who.HLP//
  249. chmod u=rw,g=rw,o=rw help.dir/who.HLP
  250.  
  251. echo x - help.dir/who.MANUAL
  252. sed 's/^XX//' > "help.dir/who.MANUAL" <<'@//E*O*F help.dir/who.MANUAL//'
  253. XX man 1 who
  254. @//E*O*F help.dir/who.MANUAL//
  255. chmod u=rwx,g=rwx,o=rwx help.dir/who.MANUAL
  256.  
  257. echo mkdir - help.dir/vi
  258. mkdir help.dir/vi
  259. chmod u=rwx,g=rwx,o=rwx help.dir/vi
  260.  
  261. echo mkdir - help.dir/vi/commands
  262. mkdir help.dir/vi/commands
  263. chmod u=rwx,g=rwx,o=rwx help.dir/vi/commands
  264.  
  265. echo x - help.dir/vi/options.HLP
  266. sed 's/^XX//' > "help.dir/vi/options.HLP" <<'@//E*O*F help.dir/vi/options.HLP//'
  267.  
  268. XX    Many parameters of the vi editor are controlled by option
  269. XX    settings: search modes, margins, tabs, line numbers, etc.
  270. XX    To set these modes the way you like, you can modify the
  271. XX    values of these options.
  272.  
  273. XX    There are two ways to set the value of an option: interactively
  274. XX    or thru initialization.  The environment variable `EXINIT' is
  275. XX    used by vi to set the initial option values.   You could have
  276. XX    a line in your ".login" file like this:
  277.  
  278. XX      setenv EXINIT 'set magic ignorecase nowrapscan shiftwidth=8'
  279.  
  280. XX    to set the logical options magic, ignorecase, and wrapscan, and
  281. XX    to set the numerical option shiftwidth.
  282.  
  283. XX    You can also set options while in the vi edit session.  Just
  284. XX    type colon ':' and to the prompt type:
  285.  
  286. XX        set autowrite
  287.  
  288. XX    to set the autowrite option.
  289.  
  290. XX    Note that setting options is done in "last line" state.
  291.  
  292. XX    Here is a list of useful options, numerical options are 
  293. XX    followed by a '=n'.  You set their value with the `=###'
  294. XX    construct shown above.  Boolean options are reset by preceding
  295. XX    their name with "no" (e.g. "nomagic").
  296.  
  297. XX      autowrite    - write buffer before changing files
  298.  
  299. XX      lisp        - set up lisp mode
  300.  
  301. XX      ignorecase    - ignore case of letters in searches
  302.  
  303. XX      magic        - allow pattern-matching expression searches
  304.  
  305. XX      number    - number lines
  306.  
  307. XX      redraw    - simulate a smart terminal
  308.  
  309. XX      shiftwidth=n    - set shift-command widths to n
  310.  
  311. XX      showmatch    - show matching parentheses as they are closed
  312.  
  313. XX      wrapmargin=n    - wrap lines n columns from right margin
  314.  
  315.  
  316. XX    Personally, I prefer the following options combination:
  317.  
  318. XX      setenv EXINIT 'set redraw noslowopen showmatch magic optimize'
  319.  
  320. XX    For a complete list of options, get into vi and type ":set all".
  321.  
  322. @//E*O*F help.dir/vi/options.HLP//
  323. chmod u=rw,g=rw,o=rw help.dir/vi/options.HLP
  324.  
  325. echo x - help.dir/vi/starting.HLP
  326. sed 's/^XX//' > "help.dir/vi/starting.HLP" <<'@//E*O*F help.dir/vi/starting.HLP//'
  327.  
  328. XX    To enter vi, just type `vi' and the name of the file to
  329. XX    edit.
  330.  
  331. XX      % vi newhelp.c
  332.  
  333. XX    This will cause vi to read the file, and set up for you to
  334. XX    edit it.  If the file does not exist, vi will tell you so.
  335. XX    Editing a new file just gives you a blank buffer to start.
  336.  
  337. XX    There are options to vi that allow you to start up your
  338. XX    editing session differently:
  339.  
  340. XX      % vi + newhelp.c    # start editing at the bottom of the file
  341.  
  342. XX      % vi +50 oldhelp.c    # start editing at line 50
  343.  
  344. XX      % vi +/main help.c    # start editing at first occurence of `main'
  345.  
  346. XX      % vi -r prog2.p       # recover edit session of prog2.p from last
  347. XX                # time system crashed
  348.  
  349. @//E*O*F help.dir/vi/starting.HLP//
  350. chmod u=rw,g=rw,o=rw help.dir/vi/starting.HLP
  351.  
  352. echo x - help.dir/vi/states.HLP
  353. sed 's/^XX//' > "help.dir/vi/states.HLP" <<'@//E*O*F help.dir/vi/states.HLP//'
  354.  
  355. XX    Vi operates in one of three basic states.  When you start the
  356. XX    edit session, you are in "visual" state.  The text insertion
  357. XX    commands (i, a, c., etc...) use "insert" state.  Searches
  358. XX    and special commands are performed in "last line" state.
  359. XX    
  360. XX    "Visual" state lets you move around and look at the file.  To
  361. XX    put in new text or change old text you use "insert" state.  To
  362. XX    execute complicated commands (e.g. 1,.s/x/X/g) you type a colon
  363. XX    to enter "Last line" state.  In "last line" state you are typing
  364. XX    to a prompt at the bottom of the screen.
  365.  
  366.  
  367. XX    STATE SUMMARY:
  368.  
  369. XX        -------------   insert cmd.s      -------------
  370. XX        |        | ------------------> |           |
  371. XX        |  VISUAL   |                     |   INSERT  |
  372. XX        |           | <------------------ |           | 
  373. XX        -------------      ESCape key     -------------
  374. XX         |        ^
  375. XX         '?' |        | 
  376. XX         '/' |      | RETURN or
  377. XX         ':' |        | ESCape
  378. XX         |        |
  379. XX         V        |
  380. XX        -------------
  381. XX        |           |
  382. XX        | LAST LINE |
  383. XX        |           |
  384. XX        -------------
  385.  
  386. @//E*O*F help.dir/vi/states.HLP//
  387. chmod u=rw,g=rw,o=rw help.dir/vi/states.HLP
  388.  
  389. echo x - help.dir/vi/commands/change.HLP
  390. sed 's/^XX//' > "help.dir/vi/commands/change.HLP" <<'@//E*O*F help.dir/vi/commands/change.HLP//'
  391.  
  392. XX    Change is an operator to replace text.  It takes the scope
  393. XX    of its "changing" from a following motion command.  
  394. XX    For instance, 'ce' sets up to change text up to the end
  395. XX    of the current word.  
  396.  
  397. XX    Changing text is done in "insert" state.  Here are some
  398. XX    examples of command sequences to change text:
  399.  
  400. XX      ce    change to end of word
  401. XX      c$    change to end of line
  402. XX      c/pat    change to first occurence of pat
  403. XX      c)    change to end of sentence
  404. XX    
  405. @//E*O*F help.dir/vi/commands/change.HLP//
  406. chmod u=rw,g=rw,o=rw help.dir/vi/commands/change.HLP
  407.  
  408. echo x - help.dir/vi/commands/delete.HLP
  409. sed 's/^XX//' > "help.dir/vi/commands/delete.HLP" <<'@//E*O*F help.dir/vi/commands/delete.HLP//'
  410.  
  411. XX    The letter 'd' is the delete operator in vi.  Because it is
  412. XX    an operator, it has no effect by itself; but requires a 
  413. XX    motion command to tell it the scope of the deletion.  As
  414. XX    a special case, "dd" deletes the entire current line.
  415.  
  416. XX    So, what can we do with this delete operator?  Basically,
  417. XX    'd' followed by any command that would move the cursor deletes
  418. XX    text up to and including where the cursor would have gone for
  419. XX    that motion.
  420.  
  421. XX    For example:
  422.  
  423. XX      de    delete 'til end of word
  424. XX      d^    delete back to beginning of line
  425. XX      df:    delete until next occurence of a ':'    
  426. XX      dL    delete to bottom of screen
  427. XX      d/how    delete up to next occurrence of "how"
  428.  
  429. XX      d?^[a-q]*:
  430. XX        delete back to next line which matches "^[a-q]*:"
  431.  
  432.  
  433. XX    Deletions are saved in queue of 10 buffers, numbered 1 thru 10.
  434. XX    The most recent deletion is always in 1.  You can get back
  435. XX    your most recent deletion with 'p', and other deletions
  436. XX    with `"np' where " is itself, and n is the number of the buffer.
  437.  
  438. XX    Therefore, to reverse the order of 3 lines, you could use 
  439. XX    this sequence of four commands:
  440.  
  441. XX        ddddp"2p
  442. XX         
  443. @//E*O*F help.dir/vi/commands/delete.HLP//
  444. chmod u=rw,g=rw,o=rw help.dir/vi/commands/delete.HLP
  445.  
  446. echo x - help.dir/vi/commands/funky.HLP
  447. sed 's/^XX//' > "help.dir/vi/commands/funky.HLP" <<'@//E*O*F help.dir/vi/commands/funky.HLP//'
  448.  
  449. XX    To help you learn vi a little better, here are some 
  450. XX    funky command sequences that will do powerful things
  451. XX    in vi.
  452.  
  453. XX    1)    Piping your buffer thru a command
  454.  
  455. XX      Let's say you want to quote something in a letter or
  456. XX      other text, by making it all upper-case.  
  457. XX      You could do this in vi command state:
  458. XX    
  459. XX        10!!tr 'a-z' 'A-Z'
  460.  
  461. XX      Another example: let's say you needed to sort a
  462. XX      buffer alphabetically.  You could use this sequence
  463. XX      in vi to pipe the whole buffer to sort(1) and back again.
  464.  
  465. XX        1G!Gsort -df    
  466. XX        
  467.  
  468. XX    2)    Pattern matching and replacement
  469.  
  470. XX      The general pattern-match-and-replacement capabilities
  471. XX      of ex(1) are excellent.  They even provide interactive
  472. XX      query-replace.
  473.  
  474. XX      Let's say you need replace the strings "XMACnnn' where 
  475. XX      'nnn' is a number, by 'ZMACROnnn' in almost every place
  476. XX      it occurs.  You could use this interactive replace to do
  477. XX      the job
  478.  
  479. XX        1,$s/XMAC\([0-9]*\)/ZMACRO\1/c
  480.  
  481. XX      Each time vi finds a candidate for replacement, it will 
  482. XX      display the line on which was found and you can type
  483. XX      "yes" or "no" to replace or not replace.  For more info
  484. XX      on regular-expression pattern-matching and area addressing,
  485. XX      see "The Ex Reference Manual".
  486.  
  487.  
  488. XX    3)    Macros      (Yes, really!)
  489.  
  490. XX      Vi has a limited macro facility that is part of ex(1).
  491. XX      The macros written using this facility can perform an
  492. XX      vi command, but have no parameters and do not nest.
  493.  
  494. XX      Macros are defined using the ":map" command.  The basic
  495. XX      syntax is:
  496. XX            :map lhs rhs
  497.  
  498. XX      The lhs should be a single character (such as 'E' or '+')
  499. XX      and may be a control character if quoted with ^V.  Let's
  500. XX      define a macro to start up an nroff paragraph.  The command
  501. XX      character will be 'P'.
  502.  
  503. XX            :map P oi.pp^V^[o
  504.  
  505. XX      You can learn more about macros in section 6.9 of
  506. XX      "An Introduction to Display Editing with Vi".
  507.  
  508.  
  509. XX    4)     Abbreviations
  510.  
  511. XX      You can define abbreviations with the ex command 'ab'.
  512. XX      For instance, to define "ax" as an abbreviation for
  513. XX      "AIRX project", you would do this:
  514.  
  515. XX        :ab ax AIRX project
  516.  
  517. XX      Abbreviations are different from macros in that they are
  518. XX      expanded in insert state, and they only work when the
  519. XX      lhs is a single word (i.e. if 'ax' were part of a longer
  520. XX      word it would be left alone).
  521.  
  522. @//E*O*F help.dir/vi/commands/funky.HLP//
  523. chmod u=rw,g=rw,o=rw help.dir/vi/commands/funky.HLP
  524.  
  525. echo x - help.dir/vi/commands/insert.HLP
  526. sed 's/^XX//' > "help.dir/vi/commands/insert.HLP" <<'@//E*O*F help.dir/vi/commands/insert.HLP//'
  527.  
  528. XX    The main way to put text in your buffer in vi is insert.
  529. XX    Several commands enter "insert" state:
  530.  
  531. XX      i    insert text right here
  532. XX      a    insert text to the right of right here
  533. XX      A    insert text at the end of the line
  534. XX      I    insert text at the beginning of this line
  535. XX      o    insert text on a following blank line
  536. XX      O    insert text on a preceding blank line
  537.  
  538. XX    Insert state is terminated with the ESCape key. 
  539. XX    You can also terminate insert with ^C (intr) but
  540. XX    that ABORTs the insert state, and your text is lost.
  541. XX    Note that insert state IS line oriented, when you have
  542. XX    finished inserting each line, that line is in the buffer
  543. XX    to stay.
  544.  
  545. XX    Several control characters have special meaning to vi
  546. XX    when you are inserting text, so they will cause actions
  547. XX    rather than be inserted.  Do not be alarmed, this kind
  548. XX    of ragged non-parameteric functionality is common in vi.
  549. XX        
  550. XX    The following commands work within insert state:
  551.  
  552. XX      ^H    erase last character
  553. XX      ^W    erase last word
  554. XX      ^U    erase this insert line
  555. XX      \    quote next character
  556. XX      ^V    really really quote next character
  557.  
  558. @//E*O*F help.dir/vi/commands/insert.HLP//
  559. chmod u=rw,g=rw,o=rw help.dir/vi/commands/insert.HLP
  560.  
  561. echo x - help.dir/vi/commands/other_commands.HLP
  562. sed 's/^XX//' > "help.dir/vi/commands/other_commands.HLP" <<'@//E*O*F help.dir/vi/commands/other_commands.HLP//'
  563.  
  564. XX    Here is a list of other useful commands for vi.  For
  565. XX    a comprehensive list of commands, see the "VI QUICK
  566. XX    REFERENCE" card.
  567.  
  568. XX    :wq    write and quit
  569. XX    :e xxx    edit file 'xxx'
  570. XX    :sh    run a subshell
  571. XX    
  572. XX    n    repeat last search
  573. XX    N    repeat last search but in opposite direction
  574. XX    %    find matching brace or parenthesis
  575. XX    )    forward to next sentence
  576. XX        or to next s-expr (lisp option)
  577. XX    (    backward sentence
  578. XX        or back s-expr (lisp option)
  579. XX    
  580. XX    ''    back to previous location
  581. XX    mX    mark this spot with letter 'X'
  582. XX    'X    go back to spot marked with 'X'
  583.  
  584. XX    J    join this line and next
  585. XX    D    delete to end of line (same as d$)
  586. XX    X    delete character before cursor
  587.  
  588. XX    >    left shift operator
  589. XX    <    right shift operator
  590. XX    !    filter thru command operator
  591. XX            
  592. XX    :[addr1,addr2]s/pattern/replacement/[option]
  593. XX        general pattern-match replacement (see ed(1) and ex(1))
  594.  
  595. XX    :r fn    read file "fn" into buffer
  596. XX    
  597. XX    :[addr1,addr2]d
  598. XX        delete everything between addr1 and addr2
  599. XX        
  600. @//E*O*F help.dir/vi/commands/other_commands.HLP//
  601. chmod u=rw,g=rw,o=rw help.dir/vi/commands/other_commands.HLP
  602.  
  603. echo Inspecting for damage in transit...
  604. temp=/tmp/sharin$$; dtemp=/tmp/sharout$$
  605. trap "rm -f $temp $dtemp; exit" 0 1 2 3 15
  606. cat > $temp <<\!!!
  607.        2      24     127 .HLP
  608.      133     744    8433 COMMANDS.HLP
  609.        9      44     252 date.HLP
  610.       36     155     898 su.HLP
  611.        1       3      10 su.MANUAL
  612.        6      25     126 who.HLP
  613.        1       3      11 who.MANUAL
  614.       55     260    1652 options.HLP
  615.       22     122     634 starting.HLP
  616.       32     149    1008 states.HLP
  617.       14      77     434 change.HLP
  618.       33     188    1071 delete.HLP
  619.       74     354    2217 funky.HLP
  620.       31     181    1051 insert.HLP
  621.       37     147     907 other_commands.HLP
  622.      486    2476   18831 total
  623. !!!
  624. wc  help.dir/.HLP help.dir/COMMANDS.HLP help.dir/date.HLP help.dir/su.HLP help.dir/su.MANUAL help.dir/who.HLP help.dir/who.MANUAL help.dir/vi/options.HLP help.dir/vi/starting.HLP help.dir/vi/states.HLP help.dir/vi/commands/change.HLP help.dir/vi/commands/delete.HLP help.dir/vi/commands/funky.HLP help.dir/vi/commands/insert.HLP help.dir/vi/commands/other_commands.HLP | sed 's=[^ ]*/==' | diff -b $temp - >$dtemp
  625. if test -s $dtemp
  626. then echo "Ouch [diff of wc output]:" ; cat $dtemp
  627. else echo "No problems found."
  628. fi
  629. exit 0
  630.